{% extends "base_form.html" %}

{% block form_body %}
<form class="form-horizontal" role="form" method="POST">
    <input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">
    <div class="row">
        <div class="panel panel-default">
            <div class="panel-body">
                {% if form.non_field_errors() %}<div class="alert alert-danger" role="alert">{{ form.non_field_errors()|join('|') }}</div>{% endif %}

                {% set messages = get_messages(request) %}
                {% if messages %}
                <div class="alert alert-success alert-dismissable">
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                    {{ messages|join('|') }}
                </div>
                {% endif %}
                <div class="form-group">
                    {{ form_input(form.old_password, "col-sm-2 control-label", "col-sm-2", "password") }}
                </div>
                <div class="form-group">
                    {{ form_input(form.new_password, "col-sm-2 control-label", "col-sm-2", "password") }}
                </div>
                <div class="form-group">
                    {{ form_input(form.review_password, "col-sm-2 control-label", "col-sm-2", "password") }}
                </div>
                <div class="form-group">
                    <div class="col-sm-3">
                    </div>
                    <div class="col-sm-6">
                        <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
{% endblock form_body %}


